package com.example.micro.netty.server.thread;

import java.util.concurrent.locks.LockSupport;

/**
 * @author Code Farmer
 * @create 2020/10/20 9:34 下午
 */
public class LockSupportThread extends Thread {

    @Override
    public void run() {
        System.out.println("in " + getName());
        LockSupport.park();
        if (Thread.interrupted()) {
            System.out.println(getName() + "已经被中断");
        }
        System.out.println(getName() + "执行结束");
    }

}
